<template>
  <div>
    <TypeNav></TypeNav>
    <ListContainer></ListContainer>
    <Recommend></Recommend>
    <Rank></Rank>
    <Like></Like>
    <Floor v-for="item in floorList" :key="item.id" :floor="item"></Floor>
    <Brand></Brand>
  </div>
</template>

<script>
import ListContainer from './components/ListContainer';
import Recommend from './components/Recommend';
import Rank from './components/Rank';
import Like from './components/Like';
import Floor from './components/Floor';
import Brand from './components/Brand';

export default {
  name: 'Home',
  // 注册局部组件
  components: {
    ListContainer,Recommend,Rank,Like,Floor,Brand
  },
  data() {
    return {

    }
  },
  computed: {
    floorList(){
      return this.$store.state.home.floorList;
    }
  },
  methods: {
    getFloorList(){
      this.$store.dispatch('getFloorList');
    }
  },
  mounted(){
    this.getFloorList();
  }
}
</script>

<style lang="scss" scoped>
</style>